package com.hovhanna.monopoly.model.deeds;

import com.hovhanna.monopoly.model.Board;
import com.hovhanna.monopoly.model.Player;

public class StationDeed extends Deed {
    private final int rentPerStation;
    
    public StationDeed(String name, int price, int rentPerStation) {
        super(name, price);
        this.rentPerStation = rentPerStation;
    }
    
    @Override
    public int getRent(Board board, Player owner) {
        int count = board.getPlayerOwnedDeedsCount(owner, StationDeed.class);
        return count * rentPerStation;
    }

}
